﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.Reflection;

namespace System
{
    /// <summary>
    /// Exception extension methods
    /// </summary>
    public static class ExceptionExt
    {
        /// <summary>
        /// Logs exception with type Error
        /// </summary>
        /// <param name="ex">The ex.</param>
        /// <param name="message">The message.</param>
        public static void Log(this Exception ex, string message = "")
        {
            ProgNetComponents.Logs.Logger.Default.LogError(message, ex);
        }
        /// <summary>
        /// Logs the error.
        /// </summary>
        /// <param name="ex">The ex.</param>
        /// <param name="message">The message.</param>
        public static void LogError(this Exception ex, string message = "")
        {
            ProgNetComponents.Logs.Logger.Default.LogError(message, ex);
        }
        /// <summary>
        /// Logs the information.
        /// </summary>
        /// <param name="ex">The ex.</param>
        /// <param name="message">The message.</param>
        public static void LogInfo(this Exception ex, string message = "")
        {
            ProgNetComponents.Logs.Logger.Default.LogInfo(message, ex);
        }
        /// <summary>
        /// Logs the warning.
        /// </summary>
        /// <param name="ex">The ex.</param>
        /// <param name="message">The message.</param>
        public static void LogWarning(this Exception ex, string message = "")
        {
            ProgNetComponents.Logs.Logger.Default.LogWarning(message, ex);
        }
        /// <summary>
        /// Logs the debug.
        /// </summary>
        /// <param name="ex">The ex.</param>
        /// <param name="message">The message.</param>
        public static void LogDebug(this Exception ex, string message = "")
        {
            ProgNetComponents.Logs.Logger.Default.LogDebug(message, ex);
        }
        /// <summary>
        /// Logs the internal.
        /// </summary>
        /// <param name="ex">The ex.</param>
        /// <param name="message">The message.</param>
        public static void LogInternal(this Exception ex, string message = "")
        {
            ProgNetComponents.Logs.Logger.Default.LogInternal(message, ex);
        }
        /// <summary>
        /// Logs all.
        /// </summary>
        /// <param name="ex">The ex.</param>
        /// <param name="message">The message.</param>
        public static void LogAll(this Exception ex, string message = "")
        {
            ProgNetComponents.Logs.Logger.Default.LogAll(message, ex);
        }
        /// <summary>
        /// Logs the user1.
        /// </summary>
        /// <param name="ex">The ex.</param>
        /// <param name="message">The message.</param>
        public static void LogUser1(this Exception ex, string message = "")
        {
            ProgNetComponents.Logs.Logger.Default.LogUser1(message, ex);
        }
        /// <summary>
        /// Logs the user2.
        /// </summary>
        /// <param name="ex">The ex.</param>
        /// <param name="message">The message.</param>
        public static void LogUser2(this Exception ex, string message = "")
        {
            ProgNetComponents.Logs.Logger.Default.LogUser2(message, ex);
        }
        /// <summary>
        /// Logs the user3.
        /// </summary>
        /// <param name="ex">The ex.</param>
        /// <param name="message">The message.</param>
        public static void LogUser3(this Exception ex, string message = "")
        {
            ProgNetComponents.Logs.Logger.Default.LogUser3(message, ex);
        }
    }
}
